package NGUYENVIETANH.OOP.EXCERCISE.EX06;


public class MODELS {
    /***
     * 
     * @param value
     * @param opt
     * @return
     */
	public String CheckIsEvenOdd (int value, int opt){
		String KQ="" ;
		int i;
		for (i =0;i<value;i++) {
			if (opt ==0){
				if(i %2 ==0){
					if(KQ.isEmpty())
						KQ +=i;
					else KQ +="-"+i;
				}
			}
			else{
				if(i %2 !=0){
					if(KQ.isEmpty())
						KQ +=i;
					else KQ +="-"+i;
				}
			}
		}
		return KQ;
	}
}
